package com.suse.util;

import com.suse.constant.RedisConstant;

/**
 * <p>
 * RedisKey工具类
 * </p>
 *
 * @author 辜玉彬
 * @since 2022-10-22 19:04
 */
public class RedisUtil {

    public static String getShopKey(long id) {
        return RedisConstant.SHOP_PREFIX + id;
    }

    public static String getShopLockKey(long id) {
        return RedisConstant.SHOP_LOCK_PREFIX + id;
    }

    public static String getShopGUIDKey() {
        return RedisConstant.SHOP_GUID;
    }

    public static String getVoucherOrderGUIDKey() {
        return "hmdp:vourcher:order:guid";
    }

    public static String getVoucherStockKey(Long voucherId) {
        return "hmdp:seckill:voucher:stock:" + voucherId;
    }

    public static String getVoucherSeckilledUsersKey(Long voucherId) {
        return "hmdp:seckill:voucher:users:" + voucherId;
    }
}
